package com.xunwulian.api.dto;


import com.xunwulian.base.constant.CommonErrorCode;
import com.xunwulian.base.entity.Page;

import java.io.Serializable;

public class BaseResponse<T> implements Serializable {

    private String code;

    private String msg;

    private Page page;

    private T data;

    public BaseResponse() {
        this.code = CommonErrorCode.SUCCESS.getType();
        this.msg = CommonErrorCode.SUCCESS.getDesc();
    }

    public BaseResponse(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Page getPage() {
        return page;
    }

    public void setPage(Page page) {
        this.page = page;
    }
}
